package com.创建方式二实现Runnable;

public class RunnableDemo {
    public static void main(String[] args) {
        //创建任务对象 不是创建线程对象
        MyRunnable myRunnable = new MyRunnable();

        //把任务转换成线程
//        Thread thread = new Thread(myRunnable);
//        thread.start();

        new Thread(myRunnable,"一号线程").start();//这样更便利

        for (int i = 0; i < 200; i++) {
            System.out.println("主线程运行:"+i);
        }
    }
}
